//
//  NetWorkTool.h
//  MobileShoppingMall
//
//  Created by 冯传昌 on 2021/4/14.
//  Copyright © 2021 冯传昌. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "NetWorkLoginAndRegister.h"

#import "NetWorkingPerson.h"

#import "NetWorkingShop.h"

#import "NetWorkingGeneral.h"

#import "NetWorkingAddress.h"

#import "NetWorkingCart.h"

#import "NetWorkingOrder.h"

NS_ASSUME_NONNULL_BEGIN

@interface NetWorkTool : NSObject

//post请求 不带token
+(void)requestPostWithUrl:(NSString *)urlString WithParams:(NSDictionary *)params withSuccessBlock:(void(^)(id responseObj))successBlock withFailedBlock:(void(^)(NSString *errorStr))failedBlock;


//post请求 携带token
+(void)requestTokenPostWithUrl:(NSString *)urlString WithParams:(NSDictionary *)params withSuccessBlock:(void(^)(id responseObj))successBlock withFailedBlock:(void(^)(NSString *errorStr))failedBlock;


//get请求 不带token
+(void)requestGetWithUrl:(NSString *)urlString withSuccessBlock:(void(^)(id responseObj))successBlock withFailedBlock:(void(^)(NSString *errorStr))failedBlock;

//get请求 携带token
+(void)requestTokenGetWithUrl:(NSString *)urlString withSuccessBlock:(void(^)(id responseObj))successBlock withFailedBlock:(void(^)(NSString *errorStr))failedBlock;

//获取token
+(NSDictionary *)getUserToken;

@end

NS_ASSUME_NONNULL_END
